package com.luyuan.crm.sale.service;

import java.util.Date;
import java.util.List;

import com.luyuan.crm.member.model.Member;
import com.luyuan.crm.sale.model.ExpressCompany;
import com.luyuan.crm.sale.model.Order;
import com.luyuan.crm.sale.model.OrderStatus;
import com.luyuan.crm.user.Party;
import com.ruijie.foundation.annotation.DomainService;
import com.ruijie.foundation.query.Page;
import com.ruijie.foundation.query.criteria.CriteriaTemplate;

@DomainService
public interface OrderService {
    Order getById(String id);

    List<Order> findByMember(Member member);

    List<Order> findByMemberId(String memberId);

    List<Order> findByOrderStatus(OrderStatus orderStatus, Date beginDate, Date endDate);

    List<Order> findByExpressCompany(String uuid, ExpressCompany expressCompany, Date beginDate, Date endDate);

    /**
     * 提交订单 
     * @author Administrator
     * @param order
     */
    void createOrder(Order order);

    void updateOrder(Order order);

    void increasePrintCount(Order order);

    void increaseExportCount(Order order);

    /**
     * 核审订单 
     * @author Administrator
     * @param order
     */
    void verifyOrder(Order order, String remarks);

    /**
     * 定单发货 
     * @author Administrator
     * @param order
     */
    void deliverOrder(Order order, String remarks);

    /**
     * 重新发货 
     * @author Administrator
     * @param order
     */
    void changeExpressOrder(Order order, String remarks);

    /**
     * 确认收货
     * @author Administrator
     * @param order
     */
    void receivedOrder(Order order, String remarks);

    /**
     * 客户拒收
     * 
     * @author Administrator
     * @param order
     */
    void rejectOrder(Order order, String remarks);

    /**
     * 取消订单
     * 
     * @author Administrator
     * @param order
     */
    void cancelOrder(Order order, String remarks);

    /**
     * 订单修改
     * <p>Create Time: 2012-9-2   </p>
     * @author Administrator
     * @param order
     */
    void returnOrder(Order order, String remarks);

    void appointSupport(Order order, Party support);

    void refresh(Order order);

    /**
     * 分页查询
     */
    Page pagedQuery(CriteriaTemplate criteria, int pageNo, int pageSize, List<org.hibernate.criterion.Order> orders);
}
